package cn.lg.soar.cms.biz.modules.article.entity;

import cn.lg.soar.core.annotations.constraints.group.Create;
import cn.lg.soar.core.annotations.constraints.group.Update;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;


/**
 * 文章足迹
 * @author luguoxiang
 * @since 2025-02-23
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "ArticleFootprint", description = "文章足迹")
@TableName("lg_cms_article_footprint")
public class ArticleFootprint {

    /** 文章id */
    @TableId(type = IdType.NONE)
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    private Long articleId;

    /** 用户id */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    private Long userId;

    /** 用户索引 */
    @NotNull(message = "用户索引不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "用户索引")
    @ApiModelProperty(value = "用户索引")
    private Integer index;

    /** 浏览时间 */
    @NotNull(message = "浏览时间不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "浏览时间")
    @ApiModelProperty(value = "浏览时间")
    private LocalDateTime time;

}
